package com.qf.shiro.base.controller;

import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangwei
 */
@RestController
@RequestMapping("/admin")
public class AdminController {
    @GetMapping("/user/list")
    @RequiresRoles(value = {"ROLE_ADMIN1"}, logical = Logical.OR)
    public String getUserList() {
        return "权限认证接口";
    }
    
    @GetMapping("/test/per")
    @RequiresPermissions("user:all")
    public String testPermission() {
        return "权限认证接口";
    }


}
